package observer.example;

/**
 * 看NBA的同事
 * @author Chen Guang
 * @date 2019/4/9 0009 下午 16:17
 */
public class NBAObserver implements Observer{

    private Subject subject;
    private String name;

    public NBAObserver(Subject subject, String name) {
        this.subject = subject;
        this.name = name;
    }

    @Override
    public void update() {
        System.out.println(name + " " + subject.getSubjectState() + " 关闭CCTV5,AI牛逼，韦德牛逼，继续工作!");
    }
}
